<template>
  <div>

    <n-card title="这是标题" style="min-height: 100vh;" >
        <n-text depth="3">
    2023年3月15日发布  已有{{route.params.id}}人阅读
  </n-text>
      <md-editor
          :theme="mydarkTheme ? 'dark' : 'light'"
          v-model="content"
          previewOnly
      />
    <n-divider title-placement="right">
    发布人：张苹果
  </n-divider>
    <n-space  justify="center">

   
    <n-button type="info" ghost @click="router.go(-1)">
        <template #icon>
        <n-icon>
          <ArrowUndo />
        </n-icon>
      </template>
        返回
    </n-button>
    <n-button  type="error" ghost @click="showModalMethod">
        <template #icon>
        <n-icon>
          <GameControllerOutline  />
        </n-icon>
      </template>
      评论
    </n-button>

  </n-space>
    </n-card>

</div>
</template>

<script  setup lang="ts">
import {ref} from "vue"
import MdEditor from 'md-editor-v3';
import 'md-editor-v3/lib/style.css';
import {useRouter,useRoute} from 'vue-router'
import{ArrowUndo,GameControllerOutline } from '@vicons/ionicons5'
import { useMessage } from 'naive-ui'
import {VaeStore} from "../store";
import {storeToRefs} from "pinia";
const router=useRouter();
const route=useRoute();
const message = useMessage()
const store = VaeStore();
let {mydarkTheme} = storeToRefs(store);
const content=ref('> 欢迎访问\n' +
    '\n' +
    '> 张苹果博客：https://zhangpingguo.com/'+'\n\n'+'![张苹果博客](https://img.zhangpingguo.com/apple_Article_Head/apple1706331015547/6531e0df-8feb-4dff-a958-305ca5ab331c.png)')
//评论
const showModalMethod=()=>{
  message.error('敬请期待')
}


 </script>

<style >
.md-editor-previewOnly {
  background: fixed !important;
}
</style>
